<?php
/**
 * 阅读消息
 * Created by PhpStorm.
 * User: yaosj
 * Date: 16-5-21
 * Time: 下午8:52
 */


class ReadNotification implements iController {

    public function output($queryArgs) {
        global $uddb;

        if (validateUser($queryArgs) !== 1 || empty($queryArgs['notification_id'])) {
            return genOutput(1000);
        }

        $uddb->update('history_user_notification',
            array('status' => 1),
            array('id' => $queryArgs['notification_id'], 'user_id' => $queryArgs['user_id'])
        );

        return genOutput(1);
    }
}